package org.JWCB.system.domain.sysuser.dto;


import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;

/**
 * 管理员注册信息类
 */
@Getter
@Setter
public class SysUserSaveDTO {

    @NotNull(message = "用户账号不能为空")
    @Size(min = 4, max = 10, message = "账号长度在4~10")
    @Pattern(regexp = "^\\S+$", message = "账号不能包含空格")
    private String userAccount;

    @NotNull(message = "用户密码不能为空")
    @Size(min = 5, max = 20, message = "密码长度在5~20")
    @Pattern(regexp = "^[a-zA-Z0-9.@]+$", message = "密码不能包含除了\".@\"之外的特殊字符")
    @Pattern(regexp = "^\\S+$", message = "密码不能包含空格")
    private String password;

    @NotNull(message = "用户昵称不能为空")
    @Size(min = 3, max = 10, message = "昵称长度在3~10")
    @Pattern(regexp = "^\\S+$", message = "昵称不能包含空格")
    private String nickName;
}
